<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <?php include_http_metas() ?>
        <?php include_metas() ?>
        <title>
            <?php echo __('Maxsimous And Domadeos') ?> 
            <?php include_slot('title') ?>
        </title>
        <link rel="shortcut icon" href="/images/test.jpeg" />
        <?php include_stylesheets() ?>
        <script>
            var  i18n = {
                "success":"<?php echo __('Success') ?>",
                'error':"<?php echo __('Error'); ?>",
                'inform':"<?php echo __('Information'); ?>",
                'worning':"<?php echo __('Worning') ?>",
                "Loading data":"<?php echo __('Loading data') ?>",
                "Please wait":"<?php echo __('Please wait') ?>"
<?php include_slot('i18n') ?>
    }

    function __(key) 
    {
        var word;
        if(i18n[key])
        {
            word = i18n[key]
        }
        else
        {
            word = key
        }
        return word;
    }
        </script>
        <?php include_javascripts() ?>

    </head>
    <body>
        <div class="headerpic"></div><!--header pic-->
        <div class="content">
            <ul class="nav">
                <?php
                $currentModule = $sf_context->getModuleName();
                $actionName    = $sf_context->getActionName()
                ?>
                <li><a class="last <?php echo $currentModule == 'home' ? 'current' : '' ?>" href="<?php echo url_for('home/index') ?>"><?php echo __('Home') ?></a></li>
                <?php if ($sf_user->isAuthenticated()): ?>
                    <?php if ($sf_user->hasCredential('superAdmin')): ?>
                        <li><a class="<?php echo $currentModule == 'role' ? 'current' : '' ?>" href="<?php echo url_for('role/index') ?>"><?php echo __('Roles') ?></a></li>
                    <?php endif ?>
                    <?php $maxUserRole = $sf_user->getAttribute('MaxUser')->getMaxUserRole(); ?>
                    <?php if ($maxUserRole->canView(SiteComponent::Category)): ?>
                        <li><a class="<?php echo $currentModule == 'category' ? 'current' : '' ?>" href="<?php echo url_for('category/index') ?>"><?php echo __('Categories') ?></a></li>
                    <?php endif ?>
                    <?php if ($maxUserRole->canView(SiteComponent::Job)): ?>
                        <li><a class="<?php echo $currentModule == 'job' ? 'current' : '' ?>" href="<?php echo url_for('job/index') ?>"><?php echo __('jobs') ?></a></li>
                    <?php endif ?>
                    <?php if ($maxUserRole->canView(SiteComponent::JobRequest)): ?>
                        <li><a class="<?php echo $currentModule == 'job_request' ? 'current' : '' ?>" href="<?php echo url_for('job_request/index') ?>"><?php echo __('job requests') ?></a></li>
                    <?php endif ?>
                    <?php if ($maxUserRole->canView(SiteComponent::User)): ?>
                        <li><a class="<?php echo $currentModule == 'user' ? 'current' : '' ?>" href="<?php echo url_for('user/index') ?>"><?php echo __('Users') ?></a></li>
                    <?php endif ?>
                    <?php if ($maxUserRole->canView(SiteComponent::Company)): ?>
                        <li><a class="<?php echo $currentModule == 'company' ? 'current' : '' ?>" href="<?php echo url_for('company/index') ?>"><?php echo __('companies') ?></a></li>
                    <?php endif ?>
                    <?php if ($maxUserRole->canView(SiteComponent::Trip)): ?>
                        <li><a class="<?php echo $currentModule == 'trip' ? 'current' : '' ?>" href="<?php echo url_for('trip/index') ?>"><?php echo __('trips') ?></a></li>
                    <?php endif ?>
                    <li class="<?php echo $actionName == 'editMyData' ? 'active' : '' ?>">
                        <a href="<?php echo url_for('EditMyData') ?>"> <?php echo __('edit my data') ?></a>
                    </li>
                    <li><a href="<?php echo url_for('Logout') ?>"> <?php echo __('logout') ?></a> </li>
                <?php endif ?>
            </ul>    	
            <?php include_partial('global/messages') ?>
            <?php echo $sf_content ?>
            <div class="footer">
                <!-- end .footer -->
            </div>
            <!-- end .container -->
        </div>
    </body>
</html>
